package utils;

import org.apache.activemq.ActiveMQConnectionFactory;

import javax.jms.*;

public class ActiveMq {
    public static final String ACTIVEMQ_URL;
    public static final String TOPIC_NAME;
    private static ActiveMQConnectionFactory activeMQConnectionFactory;

    static {
        ACTIVEMQ_URL = "tcp://127.0.0.1:61616";
        TOPIC_NAME = "queue";
        activeMQConnectionFactory = new ActiveMQConnectionFactory(ACTIVEMQ_URL);
    }

    public static Connection getConnection() throws JMSException {
        return activeMQConnectionFactory.createConnection();


    }


}
